import {
    Entity,
    Column,
    PrimaryGeneratedColumn,
    CreateDateColumn,
    UpdateDateColumn,
  } from 'typeorm';

@Entity('relation')
export class Relation {
    @PrimaryGeneratedColumn({
        type: 'int',
        comment: '主键id',
      })
      rid: number;
    
      @Column('varchar', {
        nullable: false,
        unique:true,
        comment: '外部平台识别标签',
      })
      relation_tag: string;
    
      @Column('varchar', {
        nullable: false,
        comment: '外部平台的唯一识别编码',
      })
      identification: string;
    
      @CreateDateColumn({
        type: 'timestamp',
        name: 'created_at',
        comment: '创建时间',
      })
      createdAt: Date;
    
      @UpdateDateColumn({
        type: 'timestamp',
        name: 'updated_at',
        comment: '最后更新时间',
      })
      updatedAt: Date;
}
